package org.jeecg.modules.factor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jeecg.modules.api.DTO.EmissionFactorQueryDTO;
import org.jeecg.modules.api.DTO.PrivateFactorQueryDTO;
import org.jeecg.modules.api.VO.EmissionFactorDescribeVO;
import org.jeecg.modules.api.VO.EmissionFactorQueryVO;
import org.jeecg.modules.api.VO.EmissionFactorVO;
import org.jeecg.modules.api.entity.CyEmissionFactor;
import org.jeecg.modules.api.entity.CyIndustryCategory;


import java.time.LocalDateTime;
import java.util.List;

/**
 * @Description: 碳排因子
 * @Author: jeecg-boot
 * @Date:   2024-11-01
 * @Version: V1.0
 */
public interface CyEmissionFactorMapper extends BaseMapper<CyEmissionFactor> {
    void changeStatus(String id, String state );

    void updatePublishTime(String id,String userName,LocalDateTime now);

    void add(CyEmissionFactor cyEmissionFactor);

    CyEmissionFactor select(String id);

    String getSourceTypeDict(String dictCode,String itemValue);

    String getDocTypeDict(String dictCode,String itemValue);

    String getProductClassificationDict(String dictCode,String itemValue);

    List<EmissionFactorVO> batchListInfo(List<String> idList);

    List<CyEmissionFactor> batchGetFactorInfo(List<String> idList);

    List<EmissionFactorQueryVO> topSearchFactor(List<String> idList,Integer SearchNum);

    List<EmissionFactorQueryVO> batchGetFactor(List<String> idList);

    List<EmissionFactorQueryVO> SelectNewPublishFactor(Integer Number);

    List<String> historyRecord(String logContent);

//    因为碳排因子库中的查询条件是根据三个字段同时进行模糊查询匹配的，所以编写了特定的查询条件
    IPage<EmissionFactorQueryVO> queryPageList(IPage<EmissionFactorQueryVO> page, EmissionFactorQueryDTO emissionFactorQueryDTO);

    IPage<EmissionFactorQueryVO> emissionQueryPageList(IPage<EmissionFactorQueryVO> page, EmissionFactorQueryDTO emissionFactorQueryDTO);


//    由于查询条件中有三个因子查询来源的条件，所以编写了特定的查询条件来匹配不同情况（碳排因子库数据源选项 个人因子库数据源选项 我的收藏数据源选项）
    IPage<EmissionFactorQueryVO> privateQueryPageList(IPage<EmissionFactorQueryVO> page, PrivateFactorQueryDTO privateFactorQueryDTO);

    //批量查询碳排因子使用说明对象
    List<EmissionFactorDescribeVO> describeList(List<String> idList);

    void logicDeleteById(String id,Integer delFlag);

    List<String> getCreatePeople(String organizationId,String deptId);

    List<CyIndustryCategory> industryCategory(String pid);
}
